package com.agger.eurekaclientuserservice.services.impl;

import com.agger.eurekaclientuserservice.mappers.ArticleMapper;
import com.agger.eurekaclientuserservice.services.ArticleService;
import com.agger.eurekacommonapi.vo.ArticleVO;
import com.agger.eurekacommonapi.vo.PageResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @classname: ArticleServiceImpl
 * @description: 实现类
 * @author chenhx
 * @date 2020-07-16 16:18:31
 */
@Service
public class ArticleServiceImpl implements ArticleService {


    @Resource
    private ArticleMapper mapper;


    @Override
    public int insertArticles(List<ArticleVO> list) {
        int i = mapper.insertArticles(list);
        return i;
    }

    @Override
    public PageResult<ArticleVO> selectArticleList(ArticleVO param) {
        List<ArticleVO> list = mapper.selectArticleList(param);
        return new PageResult<ArticleVO>().setRows(list);
    }
}
